#include "threadPool.hpp"

int Add(int num1, int num2)
{
    // this_thread::sleep_for(chrono::seconds(1));
    // cout << "Add" << endl;
    return num1 + num2;
}

int main()
{
    ThreadPool pool;
    for (int i = 0; i < 10; i++)
    {
        future<int> fut = pool.PushTask(Add, i, i);
        int ret = fut.get();
        cout << "ret:" << ret << endl;
    }
    // pool.stop();
    return 0;
}